<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改代码模版文件')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-templateFile-edit" th:object="${genTemplateFile}">
            <input name="fileId" th:field="*{fileId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">代码文件名称：</label>
                <div class="col-sm-8">
                    <input name="fileName" th:field="*{fileName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">代码文件描述：</label>
                <div class="col-sm-8">
                    <input name="fileDesc" th:field="*{fileDesc}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">模版文件路径：</label>
                <div class="col-sm-8">
                    <input name="filePath" th:field="*{filePath}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">代码类型：</label>
                <div class="col-sm-8">
                    <input name="fileExt" th:field="*{fileExt}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">输出路径：</label>
                <div class="col-sm-8">
                    <input name="outDir" th:field="*{outDir}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">静态页面样例：</label>
                <div class="col-sm-8">
                    <input name="exampleUrl" th:field="*{exampleUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">模版id：</label>
                <div class="col-sm-8">
                    <input name="templateId" th:field="*{templateId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "generator/templateFile";
        $("#form-templateFile-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-templateFile-edit').serialize());
            }
        }
    </script>
</body>
</html>